﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Threading;
using MS.Internal.Mita.Foundation;
using Dtf.Core.Utilities;
using DockingLib.Docking;


namespace UIAStudio
{
    public delegate void SelectedItemChangedHandler(UIObject uiObj);

    public class TreeWalker : DockableSheet
    {
        private System.ComponentModel.IContainer components = null;
        private UIATreeView m_uiaTreeView = null;
        private UICondition _treeCondition = null;

        public TreeWalker()
        {
            _treeCondition = UICondition.ControlTree;
            InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.m_uiaTreeView = new UIAStudio.UIATreeView();
            this.SuspendLayout();
            // 
            // m_uiaTreeView
            // 
            this.m_uiaTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
            this.m_uiaTreeView.Location = new System.Drawing.Point(0, 0);
            this.m_uiaTreeView.Name = "m_uiaTreeView";
            this.m_uiaTreeView.Size = new System.Drawing.Size(284, 262);
            this.m_uiaTreeView.TabIndex = 0;
            // 
            // TreeWalker
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(284, 262);
            this.Controls.Add(this.m_uiaTreeView);
            this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.HideOnClose = true;
            this.Name = "TreeWalker";
            this.ShowHint = DockingLib.Docking.DockState.DockLeft;
            this.Text = "TreeWalker";
            this.Load += new System.EventHandler(this.TreeWalker_Load);
            this.ResumeLayout(false);

        }

        public UIATreeView UIATreeView
        {
            get
            {
                return m_uiaTreeView;
            }
        }

        private void TreeWalker_Load(object sender, EventArgs e)
        {
            m_uiaTreeView.Initialize();
        }

        public UICondition TreeCondition
        {
            get
            {
                return _treeCondition;
            }
            set
            {
                _treeCondition = value;
            }
        }

    }
}
